<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/include/head.jsp"%>
<table id="dg" >
</table>

<div id="queryDialog" class="easyui-dialog" title="查询" style="width: 500px; height: 260px;"  
                 data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true,buttons:'#searchbb'">  
            <form action="" id="searchForm">
	            <table cellpadding="0" cellspacing="1" class="formtable">
								<tr>
				<td align="right"><label class="Validform_label">客户名称:</label></td>
				<td class="value">
					<input class="easyui-textbox" type="text"  id="cusName" name="cusName"/>
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">客户区域:</label></td>
				<td class="value">
					<input class="easyui-textbox" type="text"  id="cusArea" name="cusArea"/>
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">客户地址:</label></td>
				<td class="value">
					<input class="easyui-textbox" type="text"  id="cusAddr" name="cusAddr"/>
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">客户类型:</label></td>
				<td class="value">
					<input class="easyui-textbox" type="text"  id="cusType" name="cusType"/>
				</td>
				</tr>
	            </table>  
            </form>
            <div style="text-align:right;margin-right:30px;"  id="searchbb">
                <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="btnSearch()">查询</a>  
                <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="btnSearchCancel()">取消</a>  
            </div>                  
</div>
<script type="text/javascript">
	$(function() {
		initCurdDatagrid('hCustomer','dg',{
			title:'客户',
			baseUrl:'',
			dwidth:'90%',//弹出对话框的宽度 百分比或者具体数字宽度
			dheight:'90%',//弹出对话框的高度 百分比或者具体数字宽度
			columns:[[    
				        {field:'cusName',title:'客户名称',width:100,sortable:true},    
				        {field:'cusArea',title:'客户区域',width:100,sortable:true},    
				        {field:'cusAddr',title:'客户地址',width:100,sortable:true},    
				        {field:'cusType',title:'客户类型',width:100,sortable:true}    
				    ]] 
		},[]);

	});
	function btnSearchCancel()
	{
		$("#queryDialog").dialog('close');  
	}
	function btnSearch()
	{ 
		$('#dg').datagrid('load',$("#searchForm").serializeObject());
		$("#queryDialog").dialog('close');
	}
	
	function reloadData()
	{
		$('#dg').datagrid('reload');
	}
	
</script>

<%@include file="/include/foot.jsp"%>